package com.lagou.edu.controller;

import com.lagou.edu.service.SendEmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date 2020/5/26 19:27
 */
@RestController
@RequestMapping("/email")
public class EmailController {


    @Autowired
    SendEmailService sendEmailService;

    @GetMapping("/{email}/{code}")
    public Boolean sendEmail(@PathVariable String email,@PathVariable String code){
        return sendEmailService.sendEmail(email, code);
    }

}
